package leetcode.editor.cn;

/**
题目名字---:回文数
题目编号---:9	
*/

public class PalindromeNumber{
    public static void main(String[] args) {
        Solution solution = new PalindromeNumber().new Solution();    
    }
    
//leetcode submit region begin(Prohibit modification and deletion)
class Solution {
    public boolean isPalindrome(int x) {
        boolean flag =true;
        char[] chars = String.valueOf(x).toCharArray();
        for (int i = 0,j=chars.length-1; i < j; i++,j--) {
            if (chars[i]!=chars[j]) {
                flag=false;
                break;
            }
        }
        return flag;
    }
}
//leetcode submit region end(Prohibit modification and deletion)


}